﻿using OD.ProjectCustomizationTool.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OD.ProjectCustomizationTool.Tools
{
    internal sealed class ResourcesLanguageSetter : SingleLineFileUpdaterBase
    {
        protected override string FileRelativePath
        {
            get { return Properties.Resources.AssemblyInfoRelativePath; }
        }

        protected override string SearchPattern
        {
            get { return Properties.Resources.ResourcesLanguageAssemblyInfoMarkSearchPattern; }
        }
        
        protected override string ReplaceLineWith
        {
            get { return Properties.Resources.ResourcesLanguageAssemblyInfoMark; }
        }

        protected override string CommentToAddBeforeReplacePattern
        {
            get
            {
                return Properties.Resources.ResourcesLanguageAssemblyInfoMarkComment;
            }
        }

        protected override void InternalUpdate()
        {
            if (!this.ProjectTypes.Contains(EProjectType.Modeling))
            {
                base.InternalUpdate();
            }
            //else
            //{   // Modeling projects do not contain AssemblyInfo file.
            //}
        }

    }
}
